<template>
  <div class="dashboard-container">
    <el-carousel
      height="450px"
      indicator-position="outside"
    >
      <el-carousel-item v-for="item in imgList" :key="item.name">
        <img :src="item.src" style="height:100%;width:100%;" alt="图片丢失了"/>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  export default {
    data() {
      return {
        imgList: [
          {
            name: '1',
            src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpica.zhimg.com%2Fv2-737ee8b996bc5c7bdcf9621ddf04cf82_1440w.jpg%3Fsource%3D172ae18b&refer=http%3A%2F%2Fpica.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639644050&t=f3b06850307dee75a3d425c1232ffe12'
          },
          {
            name: '2',
            src: 'https://img2.baidu.com/it/u=3475619767,1876549473&fm=26&fmt=auto'
          },
          {
            name: '3',
            src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimages.enet.com.cn%2Fi%2F2016%2F0512%2F174813370.jpg&refer=http%3A%2F%2Fimages.enet.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639644050&t=12c9c44c0652db67fcfe7f6640841349'
          },
          {
            name: '4',
            src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.takungpao.com%2F2018%2F0430%2F20180430031620824.jpg&refer=http%3A%2F%2Fimg.takungpao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639644050&t=bf02b6456c58fc0390cf463df400fca8'
          }
        ]
      }
    },
    computed: {
      ...mapGetters([
        'name'
      ])
    }
  }
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }

  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
